import { PremiumType } from "./premium_type"
import { AnyType } from "~/models/types/any_type";
import { NullType } from "./null_type"


// 定义: any(全集) 类型,any类型兼容任何类型
export const tAny = new AnyType()

// 定义: null(空集) 类型,null类型不兼容本身以外的任何类型
export const tNull = new NullType()

// 定义: 4大基本类型
export const tStr = new PremiumType('string', '', '[object String]')
export const tNum = new PremiumType('number', 0, '[object Number]')
export const tBool = new PremiumType('boolean', false, '[object Boolean]')
export const tBin = new PremiumType('binary', new ArrayBuffer(0), '[object ArrayBuffer]')

/** 接受输入框输入的类型 */
export const TypesInherent = [
  tAny, tNull, tStr, tNum, tBool, tBin
]
export const TypesReceiveLiterial = [tStr, tNum, tBool]
